package com.pan.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author by panstark
 * @description
 * @notice
 * @date 2020/11/27
 */
@Slf4j
@Controller
public class BeefController {

    @GetMapping("/greeting")
    public String greeting(@RequestParam(name="name", required=false, defaultValue="World") String name, Model model) {
        log.info("BeefController---greeting------");
        model.addAttribute("name", name);
        return "greeting";
    }
}
